package com.courier.pojo;

import com.alibaba.fastjson.annotation.JSONField;

import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.PathParam;
import java.io.IOException;
import java.sql.Timestamp;

/**
 * @author mohan lau
 * @version 1.0
 * @ClassName Chat
 * @Descripition TODO 聊天的实体类
 * @Date 2021/5/12 1:03
 **/
public class Chat {
    /**
     * 订单编号
     */
    private int cid;
    /**
     * 发送信息的人
     */
    private String fromname;
    /**
     * 接受信息的人
     */
    private String toname;
    /**
     * 聊天内容
     */
    private String message;
    /**
     * 对话时间
     */
    private Timestamp ctime;
    /**
     * 对话内容状态（已读/未读）
     */
    private String status;

    public Chat() {
    }

    public Chat(int cid, String fromname, String toname, String message, Timestamp ctime, String status) {
        this.cid = cid;
        this.fromname = fromname;
        this.toname = toname;
        this.message = message;
        this.ctime = ctime;
        this.status = status;
    }

    public int getCid() {
        return cid;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }

    public String getFromname() {
        return fromname;
    }

    public void setFromname(String fromname) {
        this.fromname = fromname;
    }

    public String getToname() {
        return toname;
    }

    public void setToname(String toname) {
        this.toname = toname;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Timestamp getCtime() {
        return ctime;
    }

    public void setCtime(Timestamp ctime) {
        this.ctime = ctime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Chat{" +
                "cid=" + cid +
                ", fromname='" + fromname + '\'' +
                ", toname='" + toname + '\'' +
                ", message='" + message + '\'' +
                ", ctime=" + ctime +
                ", status='" + status + '\'' +
                '}';
    }
}


